<<<<<<< .mine
/**
 * 
 */
package br.srv.full.virtual.faces.manager;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import br.srv.full.persistence.BeansManager;
import br.srv.full.service.ServiceLocator;
import br.srv.full.virtual.engine.users.PersonsManager;
import br.srv.full.virtual.entities.persons.Client;

/**
 * @author Delfino
 *
 */
public final class ClientsRecordsManager extends Object {

	/**
	 * 
	 */
	private UserRecordsManager userRecordsManager;

	private PersonsManager personManager;

	private BeansManager beansManager;
	{
		personManager = ServiceLocator.getService(PersonsManager.class, "remote");
		beansManager = ServiceLocator.getService(BeansManager.class, "remote");
	}

	/**
	 * @return the userRecordsManager
	 */
	public UserRecordsManager getUserRecordsManager() {
		return userRecordsManager;
	}

	/**
	 * @param p_userRecordsManager the userRecordsManager to set
	 */
	public void setUserRecordsManager(UserRecordsManager p_userRecordsManager) {
		userRecordsManager = p_userRecordsManager;
	}

	public Action listAllClients(){
		return null;
	}
	

	public List<Client> getAllClients() {
		Object l_obj = personManager.find(Client.class);
		Collection<Client> l_clients;
		if (l_obj instanceof Collection) {
			l_clients = (Collection<Client>) l_obj;

		} else {
			l_clients = new ArrayList<Client>(1);
			l_clients.add((Client) l_obj);
		}
		return new ArrayList<Client>(l_clients);
	}


}
=======
/**
 * 
 */
package br.srv.full.virtual.faces.manager;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import br.srv.full.persistence.BeansManager;
import br.srv.full.service.ServiceLocator;
import br.srv.full.virtual.engine.users.PersonsManager;
import br.srv.full.virtual.entities.persons.Client;

/**
 * @author Delfino
 *
 */
public final class ClientsRecordsManager extends Object {

	/**
	 * 
	 */
	private UserRecordsManager userRecordsManager;

	private PersonsManager personManager;

	private BeansManager beansManager;
	{
		personManager = ServiceLocator.getService(PersonsManager.class, "remote");
		beansManager = ServiceLocator.getService(BeansManager.class, "remote");
	}

	/**
	 * @return the userRecordsManager
	 */
	public UserRecordsManager getUserRecordsManager() {
		return userRecordsManager;
	}

	/**
	 * @param p_userRecordsManager the userRecordsManager to set
	 */
	public void setUserRecordsManager(UserRecordsManager p_userRecordsManager) {
		userRecordsManager = p_userRecordsManager;
	}

	public Action listAllClients(){
		return null;
	}
	

	public List<Client> getAllClients() {
		Object l_obj = personManager.find(Client.class);
		Collection<Client> l_clients;
		if (l_obj instanceof Collection) {
			l_clients = (Collection<Client>) l_obj;

		} else {
			l_clients = new ArrayList<Client>(1);
			l_clients.add((Client) l_obj);
		}
		return new ArrayList<Client>(l_clients);
	}


}
>>>>>>> .r15
